
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!-- Apple devices fullscreen -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link href="../css/main.css?v=12u234y" rel="stylesheet" type="text/css">
<link href="../css/page.css" rel="stylesheet" type="text/css">
<link href="../font/css/font-awesome.min.css" rel="stylesheet" />
<!--[if IE 7]>
  <link rel="stylesheet" href="../font/css/font-awesome-ie7.min.css">
<![endif]-->
<link href="../js/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
<link href="../js/perfect-scrollbar.min.css" rel="stylesheet" type="text/css"/>
<style type="text/css">html, body { overflow: visible;}</style>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery-ui/jquery-ui.min.js"></script>
<script type="text/javascript" src="../js/layer/layer.js"></script><!-- 弹窗js 参考文档 http://layer.layui.com/-->
<script type="text/javascript" src="../js/admin.js"></script>
<script type="text/javascript" src="../js/flexigrid.js"></script>
<script type="text/javascript" src="../js/jquery.validation.min.js"></script>
<script type="text/javascript" src="../js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="../js/jquery.mousewheel.js"></script>
<script src="../js/myFormValidate.js"></script>
<script src="../js/myAjax2.js"></script>
<script src="../js/global.js"></script>
<script type="text/javascript">
function delfunc(obj){
	layer.confirm('确认删除？', {
		  btn: ['确定','取消'] //按钮
		}, function(){
			$.ajax({
				type : 'post',
				url : $(obj).attr('data-url'),
				data : {act:'del',del_id:$(obj).attr('data-id')},
				dataType : 'json',
				success : function(data){
					if(data==1){
						layer.msg('操作成功', {icon: 1});
						$(obj).parent().parent().parent().remove();
					}else{
						layer.msg(data, {icon: 2,time: 2000});
					}
				}
			})
		}, function(index){
			layer.close(index);
			return false;// 取消
		}
	);
}

function delAll(obj,name){
	var a = [];
	$('input[name*='+name+']').each(function(i,o){
		if($(o).is(':checked')){
			a.push($(o).val());
		}
	})
	if(a.length == 0){
		layer.alert('请选择删除项', {icon: 2});
		return;
	}
	layer.confirm('确认删除？', {btn: ['确定','取消'] }, function(){
			$.ajax({
				type : 'get',
				url : $(obj).attr('data-url'),
				data : {act:'del',del_id:a},
				dataType : 'json',
				success : function(data){
					if(data == 1){
						layer.msg('操作成功', {icon: 1});
						$('input[name*='+name+']').each(function(i,o){
							if($(o).is(':checked')){
								$(o).parent().parent().remove();
							}
						})
					}else{
						layer.msg(data, {icon: 2,time: 2000});
					}
					layer.closeAll();
				}
			})
		}, function(index){
			layer.close(index);
			return false;// 取消
		}
	);	
}

//表格列表全选反选
$(document).ready(function(){
	$('.hDivBox .sign').click(function(){
	    var sign = $('#flexigrid > table>tbody>tr');
	   if($(this).parent().hasClass('trSelected')){
	       sign.each(function(){
	           $(this).removeClass('trSelected');
	       });
	       $(this).parent().removeClass('trSelected');
	   }else{
	       sign.each(function(){
	           $(this).addClass('trSelected');
	       });
	       $(this).parent().addClass('trSelected');
	   }
	})
});

//获取选中项
function getSelected(){
	var selectobj = $('.trSelected');
	var selectval = [];
    if(selectobj.length > 0){
        selectobj.each(function(){
        	selectval.push($(this).attr('data-id'));
        });
    }
    return selectval;
}
</script>
</head>
  
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default;">
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <div class="subject">
        <h3>文章分类</h3>
        <h5>网站文章分类添加与管理</h5>
      </div>
    </div>
  </div>
  <div class="explanation" id="explanation">
    <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
      <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
      <span id="explanationZoom" title="收起提示"></span>
    </div>
    <ul>
      <li>新增文章时，可选择文章分类。文章分类将在前台文章列表页显示</li>
      <li>系统文章分类不可以删除</li>
    </ul>
  </div>
  <form method="post">
    <input type="hidden" name="form_submit" value="ok">
    <div class="flexigrid">
      <div class="mDiv">
        <div class="ftitle">
          <h3>文章分类列表</h3>
          <h5></h5>
        </div>
      </div>
      <div class="hDiv">
        <div class="hDivBox">
          <table cellpadding="0" cellspacing="0">
            <thead>
              <tr>
                <th align="center" class="sign" axis="col0">
                  <div style="text-align: center; width: 24px;"><i class="ico-check"></i></div>
                </th>
                <th align="center" class="handle" axis="col1">
                  <div style="text-align: center; width: 150px;">操作</div>
                </th>
                <th align="center" axis="col2">
                  <div style="text-align: center; width: 60px;">排序</div>
                </th>
                <th align="left" axis="col3" class="">
                  <div class="sundefined" style="text-align: left; width: 350px;">分类名称</div>
                </th>
                <th axis="col4">
                  <div></div>
                </th>
              </tr>
            </thead>
          </table>
        </div>
      </div>
      <div class="tDiv">
        <div class="tDiv2">
         <a href="category.html">
          <div class="fbutton">
            <div class="add" title="新增分类">
              <span><i class="fa fa-plus"></i>新增分类</span>
            </div>
          </div>
         </a> 
        </div>
        <div style="clear:both"></div>
      </div>      
      <div class="bDiv" style="height: auto;">
        <table class="flex-table autoht" cellpadding="0" cellspacing="0" border="0" id="article_cat_table">
          <tbody id="treet1">
                      <tr nctype="0"  class="parent_id_0" data-level="0">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,20)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:0em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/20.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/20.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="20" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','20','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="促销活动"  onchange="changeTableVal('article_cat','cat_id',20,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  class="parent_id_0" data-level="0">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,11)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:0em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/11.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/11.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="11" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','11','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="购物指南"  onchange="changeTableVal('article_cat','cat_id',11,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  class="parent_id_0" data-level="0">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,2)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:0em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/2.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/2.html">新增下级分类</a></li>                    
                    	                     <!--<li><a href="javascript:void(0)">删除当前分类</a></li> -->
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','2','sort_order',this)" size="4" value="1" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="店铺帮助"  onchange="changeTableVal('article_cat','cat_id',2,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_2" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,14)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/14.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/14.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="14" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','14','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="招商标准"  onchange="changeTableVal('article_cat','cat_id',14,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_14" data-level="2">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,18)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:8em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/18.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/18.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="18" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','18','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="入住资质"  onchange="changeTableVal('article_cat','cat_id',18,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_18" data-level="3">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,19)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:12em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/19.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/19.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="19" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','19','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="进驻详情"  onchange="changeTableVal('article_cat','cat_id',19,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_14" data-level="2">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,9)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:8em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/9.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/9.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="9" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','9','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="规则体系"  onchange="changeTableVal('article_cat','cat_id',9,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_2" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,16)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/16.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/16.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="16" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','16','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="资费标准"  onchange="changeTableVal('article_cat','cat_id',16,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_2" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,10)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/10.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/10.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="10" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','10','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="联系方式"  onchange="changeTableVal('article_cat','cat_id',10,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_2" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,8)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/8.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/8.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="8" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','8','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="入驻流程"  onchange="changeTableVal('article_cat','cat_id',8,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  class="parent_id_0" data-level="0">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,1)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:0em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/1.html">编辑分类信息</a></li>                  
                    	                     <!--<li><a href="javascript:void(0)">删除当前分类</a></li> -->
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','1','sort_order',this)" size="4" value="3" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="系统分类"  onchange="changeTableVal('article_cat','cat_id',1,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_1" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,4)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/4.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/4.html">新增下级分类</a></li>                    
                    	                     <!--<li><a href="javascript:void(0)">删除当前分类</a></li> -->
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','4','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="支付方式"  onchange="changeTableVal('article_cat','cat_id',4,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_1" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,3)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/3.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/3.html">新增下级分类</a></li>                    
                    	                     <!--<li><a href="javascript:void(0)">删除当前分类</a></li> -->
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','3','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="购物指南"  onchange="changeTableVal('article_cat','cat_id',3,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_1" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,6)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/6.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/6.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="6" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','6','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="售后服务"  onchange="changeTableVal('article_cat','cat_id',6,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_6" data-level="2">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,12)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:8em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/12.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/12.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="12" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','12','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="退款/售后"  onchange="changeTableVal('article_cat','cat_id',12,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_1" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,15)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/15.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/15.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="15" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','15','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="帮助中心"  onchange="changeTableVal('article_cat','cat_id',15,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_1" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,13)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/13.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/13.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="13" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','13','sort_order',this)" size="4" value="0" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="关于我们"  onchange="changeTableVal('article_cat','cat_id',13,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_1" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,7)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/7.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/7.html">新增下级分类</a></li>                    
                    	                     <li><a href="javascript:void(0)" data-url="/index.php/admin/Article/categoryHandle.html" data-id="7" onClick="delfun(this)">删除当前分类</a></li>
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','7','sort_order',this)" size="4" value="2" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="常见问题"  onchange="changeTableVal('article_cat','cat_id',7,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                        <tr nctype="0"  style="display:none;" class="parent_id_1" data-level="1">
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<img src="../images/tv-expandable.gif" fieldid="2" status="open" nc_type="flex" onClick="treeClicked(this,5)">                    
                </div>
              </td>
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn" style="padding-left:4em"><em><i class="fa fa-cog"></i>设置<i class="arrow"></i></em>
                  <ul>

                    <li><a href="/index.php/admin/Article/category/act/edit/cat_id/5.html">编辑分类信息</a></li>                  
                                      
                        <li><a href="/index.php/admin/Article/category/parent_id/5.html">新增下级分类</a></li>                    
                    	                     <!--<li><a href="javascript:void(0)">删除当前分类</a></li> -->
                                                             
                  </ul>
                  </span>
                </div>
              </td>
              <td class="sort">
                <div style="text-align: center; width: 60px;">
                  <input type="text" onKeyUp="this.value=this.value.replace(/[^\d]/g,'')" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onChange="changeTableVal('article_cat','cat_id','5','sort_order',this)" size="4" value="2" />
                </div>
              </td>
              <td class="name">
                <div style="text-align: left; width: 350px;">       
                  <input type="text" value="配送服务"  onchange="changeTableVal('article_cat','cat_id',5,'cat_name',this)"/>
                </div>
              </td>
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr>
                                
          </tbody>
        </table>        
      </div>
    </div>
  </form>
  <script>
     // 点击展开 收缩节点
     function treeClicked(obj,cat_id){
		 var src = $(obj).attr('src');
		 if(src == '../images/tv-expandable.gif')
		 {
			 $(".parent_id_"+cat_id).show();
			 $(obj).attr('src','../images/tv-collapsable-last.gif');
		 }else{			 
			 $(obj).attr('src','../images/tv-expandable.gif');			 
			 
			 // 如果是点击减号, 遍历循环他下面的所有都关闭
			 var tbl = document.getElementById("article_cat_table");
			 cur_tr = obj.parentNode.parentNode.parentNode;
			 var fnd = false;
			  for (i = 0; i < tbl.rows.length; i++)
			  {
				  var row = tbl.rows[i];
				  
				  if (row == cur_tr)
				  {
					  fnd = true;         
				  }
				  else
				  {
					  if (fnd == true)
					  {
						 
						  var level = parseInt($(row).data('level'));
						  var cur_level = $(cur_tr).data('level');
						 
						  if (level > cur_level)
						  {
							  $(row).hide();		
							  $(row).find('img').attr('src','../images/tv-expandable.gif');
						  }
						  else
						  {
							  fnd = false;
							  break;
						  }
					  }
				  }
			  }			 
		 }		 
	 }

     function delfun(obj) {
       layer.confirm('确认删除？', {
                 btn: ['确定', '取消'] //按钮
               }, function () {
                 // 确定
                 $.ajax({
                   type: 'post',
                   url : $(obj).attr('data-url'),
                   data : {act:'del',cat_id:$(obj).attr('data-id')},
                   dataType: 'json',
                   success: function (data) {
                     if (data == 1) {
                       layer.msg('操作成功', {icon: 1});
                       $(obj).parent().parent().parent().parent().parent().parent().remove();
                     } else {
                       layer.msg(data, {icon: 2, time: 2000});
                     }
                   }
                 })
               }, function (index) {
                 layer.close(index);
               }
       );
     }
  </script>
</div>
</body>
</html>